package net.wofly.sale.exchange.util;


/**
 * @author lign
 * @version 1.0
 * @created 28-九月-2017 21:36:37
 */
public enum CardType {
	厂投卡(1, "厂投卡"),
	自投卡(2, "自投卡");

	private Integer value;
	private String name;

	private CardType(Integer value, String name) {
		this.value = value;
		this.name = name;
	}

	public static boolean isValueCorrect(Integer value) {
		for (CardType forEnum : values()) {
			if (value == forEnum.getValue()) {
				return true;
			}
		}
		return false;
	}

	public static String getName(Integer value) {
		for (CardType forEnum : values()) {
			if (value.equals(forEnum.getValue())) {
				return forEnum.name;
			}
		}
		return null;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}
}